{include file="include:header" /}
<body class="fixed-sidebar full-height-layout gray-bg" >
<!-- 会员列表 -->
<div class="row wrapper border-bottom white-bg page-heading leave-list">
    <div class="col-sm-4">
        <h2>{$title}</h2>
        <ol class="breadcrumb">
            <li><a href="{:url('admin/Index/home')}">主页</a></li>
            <li><a href="#">留言管理</a></li>
            <li><strong>{$title}</strong></li>
        </ol>
    </div>

</div>


<!-- 会员列表 -->
<div class="wrapper wrapper-content  admit-index">
    {if condition="$data_state eq 1"}
    <div class="row">
        <!-- 搜索部分 -->
        <div class="col-sm-6">
            <div class="panel panel-default" >
                <div class="panel-heading">快速查询</div>
                <div class="panel-body">
                    <form class="form-horizontal search-form" action="" method="get" >
                        <div class="form-group">
                            <label class="col-xs-2 control-label">留言姓名</label>
                            <div class="col-xs-10 ">
                                <input type="text" class="form-control" name="username" value="{$post['username']?$post['username']:''}" placeholder="留言姓名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2  control-label">类型</label>
                            <div class="col-xs-10 ">
                                <select class="form-control m-b" name="leave_type">
                                    <option value="">全部</option>
                                    {if condition="$post['leave_type'] eq ''"}
                                    <option value="1">公共留言</option>
                                    <option value="2">找律师打官司</option>
                                    {else /}
                                    <option value="1" {eq name="$post['leave_type']" value="1" }selected="selected" {/eq}>公共留言</option>
                                    <option value="2" {eq name="$post['leave_type']" value="2" }selected="selected" {/eq}>找律师打官司</option>
                                    {/if}

                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2  control-label">状态</label>
                            <div class="col-xs-10 ">
                                <select class="form-control m-b" name="leave_state">
                                    <option value="">全部</option>
                                    {if condition="$post['leave_state'] eq ''"}
                                    <option value="1">未读</option>
                                    <option value="2">已读</option>
                                    {else /}
                                    <option value="1" {eq name="$post['leave_state']" value="1" }selected="selected" {/eq}>未读</option>
                                    <option value="2" {eq name="$post['leave_state']" value="2" }selected="selected" {/eq}>已读</option>
                                    {/if}

                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-2 control-label">留言时间</label>
                            <div class="col-xs-10 ">
                                <input  type="text" name="stime"  size="18" value="{$post.stime?$post.stime:''}" placeholder="开始" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />&nbsp;&nbsp;
                                <br/><input type="text" name="otime" size="18" value="{$post.otime?$post.otime:''}" placeholder="结束" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <a href="javascript:;" ><input type="submit" value="搜索" class="search-btn mg-right-10 col-xs-offset-4 btn btn-primary consult-search" /></a>

                    </form>
                </div>
            </div>
        </div>
        {/if}

    </div>

    <!-- 表格主体 -->
    <form method="get" class="valid-forms form-horizontal">
    <table class="table table-bordered white-bg">
        <tr >
            <th style="width:100px;"><input  type="checkbox" class="input_hide" id="selectasst" />全选&nbsp;&nbsp;
                <a href="javascript:;" class="btn btn-xs btn-primary btn-danger leave-request" >标记已读</a>
            </th>
            <th>序号</th>
            <th>留言姓名</th>
            <th>联系方式</th>
            <th>类型与状态</th>
            <th style="width:400px;">留言内容</th>
            <th>留言时间</th>
            <th>操作</th>
        </tr>
        {volist name="list" id="v"}
        <tr>
            <td>
                {if condition="$v['leave_state'] eq 1"}<input type="checkbox" name="leave_id[]" value="{$v['leave_id']}" /> {/if}
            </td>
            <td >{$v['leave_id']}</td>
            <td style="color: red;">{$v['username']}</td>
            <td style="color: red;">{$v['phone']}</td>
            <td>
                {if condition="$v['leave_type'] eq 1"}<span class="btn btn-xs  btn-danger">公共留言
                            {else/}<span class="btn btn-xs btn-success">找律师打官司
                            {/if}</span>&nbsp;&nbsp;&nbsp;
                     {if condition="$v['leave_state'] eq 1"}<span class="btn btn-xs   btn-success">未读
                            {else/}<span class="btn btn-xs btn-danger">已读
                            {/if}</span>&nbsp;
                     {if condition="$v['source'] eq 1"}<span class="btn btn-xs   btn-success">PC端
                            {else/}<span class="btn btn-xs btn-danger">移动端
                            {/if}</span>
            </td>
            <td >{$v['content']}</td>
            <td>{$v['leave_addtime']}</td>
            <td >
                {if condition="$v['leave_state'] eq 1"}
                     <a class="btn-primary btn-xs btn btn-outline leave-dispose" href="javascript:;" value="{$v['leave_id']}">标记已读</a>
                &nbsp; &nbsp;
                {/if}

                <a href="javascript:;" class="btn btn-xs btn-primary btn-danger leave-delete"  value="{$v['leave_id']}">删除</a>
            </td>
        </tr>
        {/volist}
    </table>
    </form>
    <!-- 分页 -->
    <div class="btn-group">{$page}</div>
</div>



</body>
</html>
{include file="include:js" /}




